import Layout from "/@/layout/index.vue";
import CustomLayout from "/@/layout/custom-index.vue";

const remainingRouter = [
  // {
  //   path: "/preview",
  //   name: "preview",
  //   component: Layout,
  //   redirect: "/project/kanban",
  //   meta: {
  //     icon: "el-icon-position",
  //     title: "项目看板",
  //     showLink: false,
  //     savedPosition: true
  //   },
  //   children: [
  //     {
  //       path: "/preview/manage",
  //       name: "preview",
  //       component: () => import("/@/views/previewPage.vue"),
  //       meta: {
  //         title: "预览",
  //         showLink: false,
  //         savedPosition: false
  //         // activeMenu: "/welcome"
  //       }
  //     }
  //   ]
  // },
  {
    path: "/search",
    name: "search",
    component: Layout,
    redirect: "/project/kanban",
    meta: {
      icon: "el-icon-position",
      title: "首页",
      showLink: false,
      savedPosition: true
    },
    children: [
      {
        path: "/search/manage",
        name: "search",
        component: () => import("/@/views/searchPage.vue"),
        meta: {
          title: "高级搜索",
          showLink: false,
          savedPosition: false
          // activeMenu: "/welcome"
        }
      }
    ]
  },
  {
    path: "/login",
    name: "login",
    component: () => import("/@/views/login.vue"),
    meta: {
      title: "message.hslogin",
      showLink: false,
      rank: 101
    }
  },
  {
    path: "/escape/login",
    name: "escapelogin",
    component: () => import("/@/views/login.vue"),
    meta: {
      title: "message.hslogin",
      showLink: false,
      rank: 101
    }
  },
  {
    path: "/register",
    name: "register",
    component: () => import("/@/views/register.vue"),
    meta: {
      title: "message.hsregister",
      showLink: false,
      rank: 102
    }
  },
  {
    path: "/logout",
    name: "logout",
    component: () => import("/@/views/logout.vue"),
    meta: {
      title: "",
      showLink: false,
      rank: 102
    }
  },

  // {
  //   path: "/preview",
  //   name: "preview",
  //   component: () => import("/@/views/previewPage.vue"),
  //   meta: {
  //     title: "预览",
  //     showLink: false,
  //     savedPosition: false
  //     // activeMenu: "/welcome"
  //   }
  // },
  {
    path: "/online",
    name: "online",
    component: () => import("/@/views/online-preview/index.vue"),
    // component: () => import("/@/views/online-preview/ecm-index.vue"),
    meta: {
      title: "在线预览",
      showLink: false,
      savedPosition: false
      // activeMenu: "/welcome"
    }
  },
  // {
  //   // 找不到路由重定向到404页面
  //   path: "/:pathMatch(.*)",
  //   name: "pathMatch",
  //   component: Layout,
  //   redirect: "/error/404",
  //   meta: {
  //     icon: "el-icon-s-home",
  //     title: "message.hshome",
  //     showLink: false,
  //     savedPosition: false,
  //     rank: 103,
  //   },
  // },
  {
    path: "/redirect",
    name: "redirect",
    component: Layout,
    meta: {
      icon: "el-icon-s-home",
      title: "message.hshome",
      showLink: false,
      savedPosition: false,
      rank: 104
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        name: "redirect",
        component: () => import("/@/views/redirect.vue")
      }
    ]
  },
  {
    path: "/profile",
    name: "profile",
    component: CustomLayout,
    redirect: "/profile",
    meta: {
      title: "message.profile",
      showLink: false
    },
    children: [
      {
        path: "/profile",
        name: "profileDetail",
        component: () => import("/@/views/profile.vue")
      }
    ]
  }
  // {
  //   path: "/testrouter/router1",
  //   name: "router1",
  //   component: () => import("/@/views/testrouter/router1/index.vue"),
  //   meta: {
  //     icon: "el-icon-view",
  //     title: "message.testRouter1",
  //     showLink: true,
  //     savedPosition: true
  //   }
  // }
];

export default remainingRouter;
